from pyquery import PyQuery as pq
import requests

doc = pq(url="https://www.baidu.com")
print(doc)

doc1 = pq(requests.get('https://www.baidu.com').text)
print(doc('title'))

doc2 = pq(filename='demo1.html')
print(doc2('h1').text())